package cn.edu.wfit.modules.learn.service.impl.competitionmanagement;

import java.util.List;
import cn.edu.wfit.common.core.utils.DateUtils;
import cn.edu.wfit.modules.learn.domain.WfitCompetitionTeamMember;
import cn.edu.wfit.modules.learn.mapper.competitionmanagement.WfitCompetitionTeamMemberMapper;
import cn.edu.wfit.modules.learn.service.competitionmanagement.IWfitCompetitionTeamMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 团队赛队伍成员关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-28
 */
@Service
public class WfitCompetitionTeamMemberServiceImpl implements IWfitCompetitionTeamMemberService
{
    @Autowired
    private WfitCompetitionTeamMemberMapper wfitCompetitionTeamMemberMapper;

    /**
     * 查询团队赛队伍成员关联
     * 
     * @param id 团队赛队伍成员关联主键
     * @return 团队赛队伍成员关联
     */
    @Override
    public WfitCompetitionTeamMember selectWfitCompetitionTeamMemberById(Long id)
    {
        return wfitCompetitionTeamMemberMapper.selectWfitCompetitionTeamMemberById(id);
    }

    /**
     * 查询团队赛队伍成员关联列表
     * 
     * @param wfitCompetitionTeamMember 团队赛队伍成员关联
     * @return 团队赛队伍成员关联
     */
    @Override
    public List<WfitCompetitionTeamMember> selectWfitCompetitionTeamMemberList(WfitCompetitionTeamMember wfitCompetitionTeamMember)
    {
        return wfitCompetitionTeamMemberMapper.selectWfitCompetitionTeamMemberList(wfitCompetitionTeamMember);
    }

    /**
     * 新增团队赛队伍成员关联
     * 
     * @param wfitCompetitionTeamMember 团队赛队伍成员关联
     * @return 结果
     */
    @Override
    public int insertWfitCompetitionTeamMember(WfitCompetitionTeamMember wfitCompetitionTeamMember)
    {
        wfitCompetitionTeamMember.setCreateTime(DateUtils.getNowDate());
        return wfitCompetitionTeamMemberMapper.insertWfitCompetitionTeamMember(wfitCompetitionTeamMember);
    }

    /**
     * 修改团队赛队伍成员关联
     * 
     * @param wfitCompetitionTeamMember 团队赛队伍成员关联
     * @return 结果
     */
    @Override
    public int updateWfitCompetitionTeamMember(WfitCompetitionTeamMember wfitCompetitionTeamMember)
    {
        wfitCompetitionTeamMember.setUpdateTime(DateUtils.getNowDate());
        return wfitCompetitionTeamMemberMapper.updateWfitCompetitionTeamMember(wfitCompetitionTeamMember);
    }

    /**
     * 批量删除团队赛队伍成员关联
     * 
     * @param ids 需要删除的团队赛队伍成员关联主键
     * @return 结果
     */
    @Override
    public int deleteWfitCompetitionTeamMemberByIds(Long[] ids)
    {
        return wfitCompetitionTeamMemberMapper.deleteWfitCompetitionTeamMemberByIds(ids);
    }

    /**
     * 删除团队赛队伍成员关联信息
     * 
     * @param id 团队赛队伍成员关联主键
     * @return 结果
     */
    @Override
    public int deleteWfitCompetitionTeamMemberById(Long id)
    {
        return wfitCompetitionTeamMemberMapper.deleteWfitCompetitionTeamMemberById(id);
    }
}
